﻿namespace Sgr.Email.BackGroundTasks
{
    public class EmailSenderData
    {
        /// <summary>
        /// 邮件ID
        /// </summary>
        public string Id { get; set; } = Guid.NewGuid().ToString();

        /// <summary>
        /// 收件人邮箱地址列表
        /// </summary>
        public List<string> To { get; set; } = new();

        /// <summary>
        /// 抄送人邮箱地址列表
        /// </summary>
        public List<string> Cc { get; set; } = new();

        /// <summary>
        /// 密送人邮箱地址列表
        /// </summary>
        public List<string> Bcc { get; set; } = new();

        /// <summary>
        /// 邮件主题
        /// </summary>
        public string Subject { get; set; } = "";

        /// <summary>
        /// 邮件正文
        /// </summary>
        public string Body { get; set; } = "";

        /// <summary>
        /// 是否为HTML格式
        /// </summary>
        public bool IsBodyHtml { get; set; } = true;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; } = DateTime.UtcNow;

        /// <summary>
        /// 重试次数
        /// </summary>
        public int RetryCount { get; set; } = 0;

        /// <summary>
        /// 最大重试次数
        /// </summary>
        public int? MaxRetryCount { get; set; }
    }
}